package com.icedata.sika.bridge

import net.mamoe.mirai.message.data.PlainText

/**
 * Sika的文本类消息
 */
class SikaPlainMessage(private val miraiPlainMessage: PlainText) : SikaSingleMessage(miraiPlainMessage) {

    /**
     * 这个构造方法是由用户调用的
     */
    @UserSikaAPI
    constructor(content: String) : this(PlainText(content))

    override fun contentToString(): String {
        return miraiPlainMessage.content
    }

    override fun toString(): String {
        return "[Sika:Plain:${miraiPlainMessage.content}]"
    }
}

fun String.toSikaPlainMessage(): SikaPlainMessage {
    return SikaPlainMessage(this)
}